export default {
	// FILE_PATH: 'http://localhost:8020/sys/file/url?fileId=',
	// BASE_PATH: 'http://localhost:8020',
	FILE_SRC_PATH: "https://oss.zhihuixiaoai.com/",
	FILE_SRC_UPLOAD:"https://api.zhihuixiaoai.com/cloud/sys/file/upload",
	// FILE_SRC_PATH: "http://192.168.0.7:8080",
	
	
	//后台富文本编辑器添加前缀
	zhuanHua(e){
		return e.replace('img src="','img src="https://manager.aichaoyanglao.cn')
	},
	
	// //将base64转化为blob
	//  export function dataURLtoFile(dataURI) {
	//   let binary = atob(dataURI.split(",")[1]);
	//   let array = [];
	//   for (let i = 0; i < binary.length; i++) {
	//     array.push(binary.charCodeAt(i));
	//   }
	//   return new Blob([new Uint8Array(array)], { type: 'image/png'});
	// },

	// //将blob对象转成file文件
	// export function uploadImg(fileData) {
	//   let formData = new FormData();
	//   let fileOfBlob = new File([fileData], new Date() + ".png"); // 命名图片名
	//   formData.append("file", fileOfBlob);
	//   return formData
	// }
	
	base64ToFile(dataurl, filename) { //将base64转换为文件
	    var arr = dataurl.split(','),
	    mime = arr[0].match(/:(.*?);/)[1],
	    bstr = atob(arr[1]),
	    n = bstr.length,
	    u8arr = new Uint8Array(n);
	    while (n--) {
	        u8arr[n] = bstr.charCodeAt(n);
	    }
	    return new File([u8arr], filename, {type: mime});
	},
	dynamicType:''

}
